// @ts-ignore
/* eslint-disable */
import request from "@/util/request.ts";

/** 此处后端没有提供注释 POST /bookBorrow/add */
export async function addBookBorrow(
  body: API.BookBorrowAddRequest[],
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/bookBorrow/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /bookBorrow/delete/${param0} */
export async function deleteBookBorrow(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteBookBorrowParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(`/bookBorrow/delete/${param0}`, {
    method: "POST",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /bookBorrow/list */
export async function listBookBorrow(
  body: API.BookBorrowQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageBookBorrowVO>("/bookBorrow/list", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /bookBorrow/my/list */
export async function listMyBookBorrows(
  body: API.BookBorrowQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageBookBorrowVO>("/bookBorrow/my/list", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /bookBorrow/update */
export async function updateBookBorrow(
  body: API.BookBorrowUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/bookBorrow/update", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
